<?php
namespace app\home\validate;

use think\Validate;

class AddCard extends Validate
{
    protected $rule = [
        'true_name'        => 'require',
        'mobile'           => 'require|number|length:11',
        'card_id'          => 'require|number',
        'bank_name'        => 'require',
    ];

    protected $message = [
        'true_name.require'        => '请输入姓名',
        'mobile.require'           => '请输入手机号',
        'mobile.number'            => '手机号格式错误',
        'mobile.length'            => '手机号长度错误',
        'card_id.require'          => '请输入卡号',
        'card_id.number'           => '卡号错误',
        'bank_name.require'        => '请选择银行名称',
    ];
}